#!/usr/bin/env bash

API=http://jenkins.ddxq.mobi/env_config/p.php
PROJECT=freelancer.m.ddxq.mobi
if [ $# != 2 ]
    then
    echo "Invalid arguments number, 2 expected."
    exit
fi

BRANCH=$1
ENV=$2
curl --data "selectproject=$PROJECT&branch=$BRANCH&selectenvironment=$ENV" $API
echo "\n"